<%--<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.lynn.salary.util.ToolMethod"%>
<%@page import="com.opensymphony.xwork2.util.ValueStack"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.lynn.salary.entity.DailySignIn"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<style>

.GFXIL1ECDS {
    border-bottom: 1px solid #E4E4E4;
    border-right: 1px solid #E4E4E4;
    float: left;
    height: 81px;
    position: relative;
    width: 92px;
}
.GFXIL1ECKS {
    background-color: #F9F9F9;
    color: #CCCCCC;
}
.GFXIL1ECGQ {
    height: 24px;
    margin-top: 10px;
}
.GFXIL1ECFS {
    color: #000000;
    font-family: ����;
    font-size: 12px;
    font-style: normal;
    font-weight: normal;
    margin-top: 15px;
    position: absolute;
    text-align: center;
    text-decoration: none;
    width: 90px;
}
.GFXIL1ECNQ {
    background: none repeat scroll 0 0 #F2F2F4;
    border-color: #E4E4E4;
    border-style: solid none solid solid;
    border-width: 1px 0 1px 1px;
    float: left;
    font-family: ����;
    font-size: 12px;
    font-weight: normal;
    height: 24px;
    line-height: 24px;
    padding: 0 28px;
}
.GFXIL1ECCS {
    font-family: ����;
    font-size: 13px;
    font-style: normal;
    font-weight: bold;
    margin: 0;
    text-align: right;
    text-decoration: none;
}
.GFXIL1ECHS {
    background: url("") no-repeat scroll 0 0 transparent;
    bottom: 4px;
    cursor: pointer;
    height: 13px;
    overflow: hidden;
    position: absolute;
    right: 4px;
    width: 13px;
}
</style>
<%
	ValueStack vs = (ValueStack)request.getAttribute("struts.valueStack");
	String month = vs.findString("month");
	List<DailySignIn> dss = (List<DailySignIn>)vs.findValue("ds");
	SimpleDateFormat sdf = new SimpleDateFormat("yyyyMM");
	Date d = sdf.parse(month);
	Calendar c = Calendar.getInstance();
	c.setTime(d);
	c.set(Calendar.DAY_OF_MONTH,1);
	String rc = ToolMethod.getCharAndNumr(10);
	
	sdf.applyPattern("yyyyMMdd");
	
	int xq = c.get(Calendar.DAY_OF_WEEK);
	int max  = c.getActualMaximum(Calendar.DAY_OF_MONTH);
	
	String year = month.substring(0,4);
	String month2 = month.substring(4);
%>
<div style="margin-top: 15px;margin-left: 15px;overflow: auto;">
<span>请选择月份</span>

<select id="a<%=rc %>">
	<option value="2010" <%=year.equals("2010")?"selected='selected'":"''" %>>2010</option>
	<option value="2011" <%=year.equals("2011")?"selected='selected'":"''" %>>2011</option>
	<option value="2012" <%=year.equals("2012")?"selected='selected'":"''" %>>2012</option>
</select>
<select id="b<%=rc %>">
<% for(int i=1;i<=12;i++) { 
	String t = i<10?"0"+i:i+"";
%>
	<option value="<%=t %>" <%=month2.equals(t)?"selected='selected'":"''" %>><%=i %></option>
<%} %>
</select>
<input  id="c<%=rc %>" type="button" value="提交" />
<a id="d<%=rc %>" href="<%=basePath %>attendance!showMyDailySign.do" target="navTab" rel="myDailySign" style="display: none;"></a>

<script>
	$("#c<%=rc %>").click(function(event) {
		var y = $("#a<%=rc %>").attr("value");
		var m = $("#b<%=rc %>").attr("value");
		var ym = y + m;

		$("#d<%=rc%>").attr("href","<%=basePath %>attendance!showMyDailySign.do?month="+ym);
		$("#d<%=rc%>").trigger("click");
	});
</script>
<div style="overflow: auto;width: 690px;height: 453px;">
<table style="width: 660px;" cellpadding="0" cellspacing="0">
	<tbody>
		<tr>
			<td style="vertical-align: top;" align="left">
				<div class="GFXIL1ECGQ">
					<span class="GFXIL1ECNQ">星期日</span>
					<span class="GFXIL1ECNQ">星期一</span>
					<span class="GFXIL1ECNQ">星期二</span>
					<span class="GFXIL1ECNQ">星期三</span>
					<span class="GFXIL1ECNQ">星期四</span>
					<span class="GFXIL1ECNQ">星期五</span>
					<span class="GFXIL1ECNQ">星期六</span>
				</div>
			</td>
		</tr>
		<tr>
			<td style="vertical-align: top;" align="left">
				<div class="GFXIL1ECJQ">
					<% 
						int mxx = 35;
					if(xq == 7) {
						mxx += max-29;
					}
					for(int i=1;i<=mxx;i++) { 
						int tmpd = i - xq + 1;
						if(i<xq || (tmpd > max)) {
					%>
						<div class="GFXIL1ECDS GFXIL1ECKS">
						<div class="GFXIL1ECCS"></div>
						<div style="opacity: 1;" class="GFXIL1ECFS"></div>
						<div style="opacity: 1; display: none" class="GFXIL1ECHS"></div>
						</div>
					<%} else {
						DailySignIn das = null;
						String timeString="";
						sdf.applyPattern("HH:mm");
						String showd = "";
						
						showd = tmpd+"";
						if(tmpd > max) {
							showd = "";
						}
						String d2 = "";
						if(tmpd<10){
							d2 = "0"+tmpd;
						} else d2 = ""+tmpd;
						for(int z=0;z<dss.size();z++) {
							DailySignIn tmp = dss.get(z);
							if(tmp.getThisDay()!=null && tmp.getThisDay().equals(month + d2) ){
								das = tmp;
							}
						}
						
						String sh = "display:none;";
						sdf.applyPattern("yyyyMMdd");
						if((month + d2).equals(sdf.format(new Date()))) {
							sh = "";
						}
						sdf.applyPattern("HH:mm");
						if(das != null) {
							if(das.getStartDate()!=null){
								timeString += sdf.format(das.getStartDate());
							} 
							
							timeString += " - ";
							if(das.getEndDate()!=null){
								timeString += sdf.format(das.getEndDate());
							} 
							
						} else {
							timeString = " ~ ";
						}
					%>
						<div class="GFXIL1ECDS GFXIL1ECKS">
						<div class="GFXIL1ECCS">
						<%=showd %>
						</div>
						<div style="opacity: 1;" class="GFXIL1ECFS">
						<%=timeString %>
						</div>
						
						<div sid="thisDay322323" thisDay="<%=month + d2 %>" style="opacity: 1; <%=sh %>" class="GFXIL1ECHS"></div>
					
						</div>
					<%} %>
					<%} %>
				</div>
			</td>
		</tr>
	</tbody>
</table>
</div>
</div>
<a href="<%=basePath %>attendance!remarkInput.do" title="填写备注"  height="145" width="420" style="display: none;" target="dialog" rel="thisdayremarkedit" sid="showMyDs-a-2323"></a>
<script>
$("div[sid=thisDay322323]").click(function(){

	<% sdf.applyPattern("yyyyMMdd");    %>
	var thisday ="<%=sdf.format(new Date())  %>";
	

	$("a[sid=showMyDs-a-2323]").attr("href","<%=basePath %>attendance!remarkInput.do?thisDay="+thisday);
	$("a[sid=showMyDs-a-2323]").trigger("click");
});

</script>--%>